package lambda_0;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class Demo1 {
    public static void main(String[] args) {
        List<String> l = new ArrayList<>();
        l.add("one");
        l.add("two");
        l.add("three");
        l.forEach(element-> System.out.println(element));
        List<String> list= l.stream().filter(e->e.contains("o")).collect(Collectors.toList());
        System.out.println(list);
    }
}
